@if(count($recharge_records))
@foreach($recharge_records as $recharge_record)
<a href="{{ route('recharge.record.detail', [$recharge_record->id]) }}">
    <div class="recharge-record-item d-flex pt-3 pb-3 align-items-start">
        <div class="recharge-record-logo pr-3">
            @if($recharge_record->is_aop)
                <img src="/assets/mobile/images/tab02.png" width="20" alt="">
            @else
                <img src="/assets/mobile/images/tab01.png" width="20" alt="">
            @endif
        </div>
        <div class="recharge-record-content flex-grow-1 d-flex flex-column">
            <span class="f14">{{ show_user_num($recharge_record->cellphone) }}
                @if($recharge_record->is_aop) 套餐充值 @else 余额充值 @endif
                @if($recharge_record->credit_num > 0) [积分抵扣] @endif
            </span>
            <b class="fn f12">{{ $recharge_record->created_at }}</b>
        </div>
        <div class="recharge-record-status d-flex flex-column align-items-end">
            @if($recharge_record->is_pay == 1)
            <span>￥{{ $recharge_record->real_amount / 100 }}</span>
            @else
            <span>￥{{ (thToRmb($recharge_record->total_amount) - ($recharge_record->credit_num / 100)) }}</span>
            @endif
            @if($recharge_record->recharge_status == 2)
            <b class="badge badge-success fn">充值成功</b>
            @endif
            @if($recharge_record->recharge_status == 4)
            <b class="badge badge-danger fn">充值失败</b>
            @endif
            @if($recharge_record->is_pay == 1 && $recharge_record->recharge_status == "" && $recharge_record->refund_status == "")
            <b class="badge badge-secondary fn">待确认</b>
            @endif
            @if($recharge_record->is_pay == 0)
            <b class="badge badge-danger fn">未支付</b>
            @endif
            @if($recharge_record->recharge_status == "" && $recharge_record->refund_status == 1)
            <b class="badge badge-primary fn">已退款</b>
            @endif
        </div>
    </div>
</a>
@endforeach
@else @endif
